home *** CD-ROM | disk | FTP | other *** search
/ PC World Komputer 2010 April / PCWorld0410.iso / hity wydania / Ubuntu 9.10 PL / karmelkowy-koliberek-desktop-9.10-i386-PL.iso / casper / filesystem.squashfs / bin / preseed_command < prev    next >
Text File  |  2008-10-27  |  468b  |  24 lines

  1. #!/bin/sh -e
  2. # Run a preseeded command.
  3. ct=$1
  4.  
  5. . /usr/share/debconf/confmodule
  6.  
  7. log () {
  8.     logger -t preseed "$@"
  9. }
  10.  
  11. db_get "$ct"
  12. command="$RET"
  13. if [ "$command" != "" ]; then
  14.     log "running preseed command $ct: $command"
  15.     code=0
  16.     log-output sh -c "$command" || code=$?
  17.     if [ "$code" != 0 ]; then
  18.         db_subst preseed/command_failed COMMAND "$command"
  19.         db_subst preseed/command_failed CODE "$code"
  20.         db_input critical preseed/command_failed || true
  21.         db_go || true
  22.     fi
  23. fi
  24.